<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://struts.apache.org/tags-html-el" prefix="html" %>
<%@ taglib uri="http://amc.af.mil/portal-el" prefix="portal" %>
<%@ taglib uri="http://amc.af.mil/radtaglibrary" prefix="rad" %>
<%@ taglib uri="http://displaytag.sf.net/el" prefix="display" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<html>
<head>
    <title>Outprocess User</title>

</head>

<body>
<rad:useBean id="userViewHelper"/>
<rad:useBean id="organizationViewHelper" />

<div id="portal-left-bar">
    <jsp:include page="../../navigation/navigationMenu.jsp"/>
</div>

<!-- TODO: Narrow User choice by Organization -->

<div id="portal-content">
    <portal:box title="Outprocess User" style="width:800px">
        <portal:subSection title="Organization">
            <html:form action="organization/outprocessUserChangeOrganization.do" method="post">
                <label for="organizationId">Organization</label>
                <html:select property="organizationId" styleId="organizationId" value="${requestScope.organizationId}">
                    <html:optionsCollection name="organizationViewHelper"
                                            property="all"
                                            value="id"
                                            label="name"
                                            filter="false"/>
                </html:select>
                <html:submit value="Select Organization"/>
            </html:form>
        </portal:subSection>
        <portal:subSection title="Select User">
            <display:table name="userViewHelper.allByOrganization"
                           style="width:100%"
                           id="user">
                <display:column title="User">
                    <c:out value="${user.displayName}" />
                </display:column>
                <display:column title="Items Assigned">

                </display:column>
                <display:column title="Hand Receipts">

                </display:column>
                <display:column title="Actions">
                    <html:link href="javascript:confirmOutprocessUser(${user.id}, '${user.displayName}')">Outprocess</html:link>
                </display:column>
            </display:table>

        </portal:subSection>
    </portal:box>
</div>
</body>
</html>